﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.IO;

namespace curbside.Core
{
    public class App
    {
        public static string BaseDirectory
        {
            get
            {
                return System.AppDomain.CurrentDomain.BaseDirectory;
            }
        }

        public static string TempDirectory
        {
            get
            {
                string path = Path.Combine(BaseDirectory, "Temp");

                if (!File.Exists(path))
                    Directory.CreateDirectory(path);

                return path;
            }
        }

        public static string BinDirectory
        {
            get
            {
                return Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "");
            }
        }

        private static string GetAppSettingValue(string key)
        {
            return ConfigurationManager.AppSettings[key];
        }
    }
}
